<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <link rel="stylesheet" href="../css/index.css">
    <link rel="stylesheet" href="../css/style.css">
    <script src="../js/vue.min.js"></script>
    <script src="../js/axios.min.js"></script>
    <script src="../js/index.js"></script>
</head>
<body>
<div id="info">账号信息
    <el-card shadow="hover" style="margin-top: 10px;">
        ID：{{ mid }}
    </el-card>
    <el-card shadow="hover">
        账号：{{ name }}
    </el-card>
    <el-card shadow="hover">
        密码：{{ pwd }}
    </el-card>
    <el-card shadow="hover">
        学号：{{ username }}
    </el-card>
</div>
</body>
<script>
    new Vue({
        el: '#info',
        data() {
            return {
                mid: '',
                name: '',
                pwd: '',
                username: ''
            }
        },
        created: function () {
            this.getInfo();
        },
        methods: {
            getInfo() {
                let here = this;
                axios({
                    method: 'post',
                    url: '/dao/managerInfo'
                }).then(function (response) {
                    let data = JSON.parse(decodeURIComponent(response.data));
                    console.log(data);
                    here.mid = data.mid;
                    here.name = data.name;
                    here.pwd = data.pwd;
                    here.username = data.username;
                });
            }
        }
    });
</script>
</html>
